package com.fire.cloud_cilent.api;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Mr.Fire
 * @Desc 订单服务
 * @Date 2021/12/5
 */
@RestController
public class OrderService {

    /**
     * 自定义路由规则
     * @return
     */
    @Bean
    public IRule createRule(){
        return  new RandomRule();
    }

    @RequestMapping("/order")
    public String order(){
        return "hello ,this is a order,id=3";
    }
}
